{layout name="layout"/}
<div class="container">
    <form class="form-inline" role="form">
        <div class="form-group">
            <label  for="bianhao">供应商编号：</label>
            <input type="text" class="form-control" id="bianhao" >
        </div>
        <div class="form-group">
            <label  for="mingcheng">供应商名称：</label>
            <input type="text" class="form-control" id="mingcheng" >
        </div>

        <button type="button" class="btn btn-primary" id="search">查询</button>
    </form>
    <button type="button" class="btn btn-default  new" data-toggle="modal" data-target="#myModal">新增</button>

    <table class="table table-bordered table-striped">

        <thead>
        <tr>
            <th>序号</th>
            <th>供应商编号</th>
            <th>供应商名称</th>
            <th>联系人</th>
            <th>联系电话</th>
            <th>联系地址</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="data" id="vo"}
        <tr>
            <td class="first">{$vo.id}</td>
            <td>{$vo.count}</td>
            <td>{$vo.supplier}</td>
            <td>{$vo.contact}</td>
            <td>{$vo.phone}</td>
            <td>{$vo.address}</td>
            <td>{$vo.mark}</td>
            <td>
                <button type="button"  count="{$vo.count}"  mark="{$vo.mark}" supplier="{$vo.supplier}" contact="{$vo.contact}" phone="{$vo.phone}" address="{$vo.address}"  class="btn btn-primary update" data-toggle="modal" data-target="#myModal2">修改</button>
                <button type="button" class="btn btn-danger del" >删除</button>
            </td>
        </tr>
      {/volist}
        </tbody>
    </table>
    {$data->render()}

</div>





<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">新增供应商</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <div class="form-group">
                        <label for="count" class="col-sm-2 control-label">供应商编号</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="count" name="count">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="supplier" class="col-sm-2 control-label">供应商名称</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="supplier" name="supplier">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="contact" class="col-sm-2 control-label">联系人</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="contact" name="contact">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="phone" class="col-sm-2 control-label">联系电话</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="phone" name="phone" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="address" class="col-sm-2 control-label">联系地址</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="address" name="address">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="mark" class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="mark" name="mark">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="add">添加</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>







<input type="hidden" value="" id="info_id">
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel2">修改信息</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <div class="form-group">
                        <label for="count" class="col-sm-2 control-label">供应商编号</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="count2" name="count2">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="supplier" class="col-sm-2 control-label">供应商名称</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="supplier2" name="supplier2">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="contact" class="col-sm-2 control-label">联系人</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="contact2" name="contact2">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="phone" class="col-sm-2 control-label">联系电话</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="phone2" name="phone2" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="address" class="col-sm-2 control-label">联系地址</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="address2" name="address2">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="mark" class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="mark2" name="mark2">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="add2">修改</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

